package com.lin.eat.dao;

import com.lin.eat.entry.Order;
import com.lin.eat.entry.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface OrderMapper {

    int submitOrder(Order order);

    int addOrderDetail(OrderDetail orderDetail);

    Order getOrderDetailByOid(@Param("o_id") String o_id);

    List<Order> getAllOrder();

    int updateOrderState(@Param("o_id") String o_id);

    int updateOrderDetailState(@Param("od_id") String od_id);

    int deleteOrder(@Param("o_id") String o_id);

}
